var company = {};

company.userid = {};

company.getData = function() {
    var req = new common.Request();
    var url = "company/companyInfo.action";
    var reqData = {};
    var urlParm = common.GetParameters();
    reqData['userId'] = urlParm['userid'];
    company.userid = reqData['userId'];
    req.sendMethodRequest("get", url , reqData, function(e){
    	if (e != null && e.companyInfo != null) {
    		$('#company_name').html(e.companyInfo.companyName);
        	$('#company_city').html(e.companyInfo.companyCity);
        	$('#company_person').html(e.companyInfo.linkMan);
        	$('#company_cell').html(e.companyInfo.companyMoble);
        	$('#company_type').html(e.companyInfo.business);
        	$('#company_desc').html(e.companyInfo.companyProfile);
    	}
    },function(e){

    });
}

company.toUpdate = function() {
	$('#update_button').click(function(){
		window.location = "company_update.html?userid=" + company.userid;
	});
}

company.getHeight = function () {
    var height = $(document).height();
    window.parent.index.iframeResize(height);
}

company.init = function() {
    company.getHeight();
    company.getData();
    company.toUpdate();
}

$(document).ready(function() {
    company.init();
});
